package ThreadTest;

class MyThread2 extends Thread{
    private int count=5;
    @Override
    public void run() {

        for (int x=0;x<50;x++){
            if (this.count>0){
                System.out.println("count="+this.count--);
            }
        }

    }
}

public class ThreadDemo03 {
    public static void main(String[] args) {
        new MyThread2().start();
        new MyThread2().start();
        new MyThread2().start();
    }

}
